<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("dailyStatics:ipCharts:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="ip"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
        </#if>
        <div id="ipTotal" class="chartStyle"></div>
        <!--<div class="chartText">-->
            <!--<i class="tipLogo yesterdayStyle1" data-toggle="tooltip" data-placement="top" title="昨日此时总计">-->
                <!--昨-->
            <!--</i>-->
            <!--<span class="valColor yCurrentTotal yesterdayStyle2">暂无</span>-->
            <!--<i class="tipLogo todayStyle1" data-toggle="tooltip" data-placement="top" title="今日此时总计">-->
                <!--今-->
            <!--</i>-->
            <!--<span class="valColor tCurrentTotal todayStyle2">暂无</span>-->
            <!--<i class="tipLogo totalStyle1" data-toggle="tooltip" data-placement="top" title="昨日总计">-->
                <!--总-->
            <!--</i>-->
            <!--<span class="valColor yTotal totalStyle2">暂无</span>-->
        <!--</div>-->
    </div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("dailyStatics:badIpCharts:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="locked_domain"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
        </#if>
        <div id="badIp" class="chartStyle"></div>
        <!--<div class="chartText">-->
            <!--<i class="tipLogo yesterdayStyle1" data-toggle="tooltip" data-placement="top" title="昨日此时总计">-->
                <!--昨-->
            <!--</i>-->
            <!--<span class="valColor yCurrentTotal yesterdayStyle2">暂无</span>-->
            <!--<i class="tipLogo todayStyle1" data-toggle="tooltip" data-placement="top" title="今日此时总计">-->
                <!--今-->
            <!--</i>-->
            <!--<span class="valColor tCurrentTotal todayStyle2">暂无</span>-->
            <!--<i class="tipLogo totalStyle1" data-toggle="tooltip" data-placement="top" title="昨日总计">-->
                <!--总-->
            <!--</i>-->
            <!--<span class="valColor yTotal totalStyle2">暂无</span>-->
        <!--</div>-->
    </div>
</div>

<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("dailyStatics:newUsersCharts:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="new_user"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
        </#if>
        <div id="shareUsers" class="chartStyle"></div>
        <!--<div class="chartText">-->
            <!--<i class="tipLogo yesterdayStyle1" data-toggle="tooltip" data-placement="top" title="昨日此时总计">-->
                <!--昨-->
            <!--</i>-->
            <!--<span class="valColor yCurrentTotal yesterdayStyle2">暂无</span>-->
            <!--<i class="tipLogo todayStyle1" data-toggle="tooltip" data-placement="top" title="今日此时总计">-->
                <!--今-->
            <!--</i>-->
            <!--<span class="valColor tCurrentTotal todayStyle2">暂无</span>-->
            <!--<i class="tipLogo totalStyle1" data-toggle="tooltip" data-placement="top" title="昨日总计">-->
                <!--总-->
            <!--</i>-->
            <!--<span class="valColor yTotal totalStyle2">暂无</span>-->
        <!--</div>-->
    </div>
</div>

<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("dailyStatics:activeUsersCharts:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="active_user"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
       </#if>
        <div id="activeUsers" class="chartStyle"></div>
        <!--<div class="chartText">-->
            <!--<i class="tipLogo yesterdayStyle1" data-toggle="tooltip" data-placement="top" title="昨日此时总计">-->
                <!--昨-->
            <!--</i>-->
            <!--<span class="valColor yCurrentTotal yesterdayStyle2">暂无</span>-->
            <!--<i class="tipLogo todayStyle1" data-toggle="tooltip" data-placement="top" title="今日此时总计">-->
                <!--今-->
            <!--</i>-->
            <!--<span class="valColor tCurrentTotal todayStyle2">暂无</span>-->
            <!--<i class="tipLogo totalStyle1" data-toggle="tooltip" data-placement="top" title="昨日总计">-->
                <!--总-->
            <!--</i>-->
            <!--<span class="valColor yTotal totalStyle2">暂无</span>-->
        <!--</div>-->
    </div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("dailyStatics:newArticleCharts:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="new_article"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
        </#if>
        <div id="articleTotal" class="chartStyle"></div>
        <!--<div class="chartText">-->
            <!--<i class="tipLogo yesterdayStyle1" data-toggle="tooltip" data-placement="top" title="昨日此时总计">-->
                <!--昨-->
            <!--</i>-->
            <!--<span class="valColor yCurrentTotal yesterdayStyle2">暂无</span>-->
            <!--<i class="tipLogo todayStyle1" data-toggle="tooltip" data-placement="top" title="今日此时总计">-->
                <!--今-->
            <!--</i>-->
            <!--<span class="valColor tCurrentTotal todayStyle2">暂无</span>-->
            <!--<i class="tipLogo totalStyle1" data-toggle="tooltip" data-placement="top" title="昨日总计">-->
                <!--总-->
            <!--</i>-->
            <!--<span class="valColor yTotal totalStyle2">暂无</span>-->
        <!--</div>-->
    </div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("dailyStatics:forwardArticleCharts:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="forward_article"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
        </#if>
        <div id="shareArticle" class="chartStyle"></div>
        <!--<div class="chartText">-->
            <!--<i class="tipLogo yesterdayStyle1" data-toggle="tooltip" data-placement="top" title="昨日此时总计">-->
                <!--昨-->
            <!--</i>-->
            <!--<span class="valColor yCurrentTotal yesterdayStyle2">暂无</span>-->
            <!--<i class="tipLogo todayStyle1" data-toggle="tooltip" data-placement="top" title="今日此时总计">-->
                <!--今-->
            <!--</i>-->
            <!--<span class="valColor tCurrentTotal todayStyle2">暂无</span>-->
            <!--<i class="tipLogo totalStyle1" data-toggle="tooltip" data-placement="top" title="昨日总计">-->
                <!--总-->
            <!--</i>-->
            <!--<span class="valColor yTotal totalStyle2">暂无</span>-->
        <!--</div>-->
    </div>
</div>
<!--<div class="row chartsBox">-->
    <!--<div class="col-md-12 chartCon">-->
        <!--<#if shiro.hasPermission("dailyStatics:forwardArticlePeoplesChart:exportExcel")>-->
        <!--<div class="exportExcelBox">-->
            <!--<span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>-->
        <!--</div>-->
       <!--</#if>-->
        <!--<div id="sharePeoples" class="chartStyle"></div>-->
        <!--<div class="chartText">-->
        <!--<i class="tipLogo yesterdayStyle1" data-toggle="tooltip" data-placement="top" title="昨日此时总计">-->
        <!--昨-->
        <!--</i>-->
        <!--<span class="valColor yCurrentTotal yesterdayStyle2">暂无</span>-->
        <!--<i class="tipLogo todayStyle1" data-toggle="tooltip" data-placement="top" title="今日此时总计">-->
        <!--今-->
        <!--</i>-->
        <!--<span class="valColor tCurrentTotal todayStyle2">暂无</span>-->
        <!--<i class="tipLogo totalStyle1" data-toggle="tooltip" data-placement="top" title="昨日总计">-->
        <!--总-->
        <!--</i>-->
        <!--<span class="valColor yTotal totalStyle2">暂无</span>-->
        <!--</div>-->
    <!--</div>-->
<!--</div>-->
<!--//转发文章次数-->
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("dailyStatics:sharedArticleNum:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="shared_article_num"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="sharedArticleNum" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("dailyStatics:incomeChart:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="expand_price"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
        </#if>
        <div id="income" class="chartStyle"></div>
</div>
</div>

<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("dailyStatics:useChart:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="statistics_ip"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
        </#if>
        <div id="ipUse" class="chartStyle"></div>
</div>
</div>

<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails:forwardIncome:chartsExport")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="forward_area_expand_price"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="forwardIncome" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:h5Income:chartsExport")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="h5_expand_price"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="h5Income" class="chartStyle"></div>
</div>
</div>


<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:forwardIpUse:chartExport")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="forward_area_statistics_ip"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="forwardIpUse" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:h5IpUse:chartExport")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="h5_statistics_ip"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="h5IpUse" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:transMoney:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="create_money"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="transMoney" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:everyIpIncome:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="ip_produce"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="everyIpIncome" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:everyIpUse:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="single_ip_pay"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="everyIpUse" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:dailyActiveIncome:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="day_active_pay"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="dailyActiveIncome" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:dailyActiveUse:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="day_active_expand"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="dailyActiveUse" class="chartStyle"></div>
</div>
</div>

<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:newUserActiveRate:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="gift_record_rate"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="cashRate" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:cashRate:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="active_ratio"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="newUserActiveRate" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:newTotalIncome:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="consume_price"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="newIncome4" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:newForwardIncome:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="new_system_forward_area_consume_price"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="newForwardIncome4" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:newH5Income:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="new_system_h5_consume_price"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="newH5Income4" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:newIpUse:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="consume_ip"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="newIpUse4" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:newForwardIpUse:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="new_system_forward_area_consume_ip"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="newForwardIpUse4" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:newH5IpUse:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="new_system_h5_consume_ip"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="newH5IpUse4" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:newForwardOutIncome:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="new_system_h5_consume_ip"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="newForwardOutIncome4" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:newForwardInsideIncome:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="new_system_h5_consume_ip"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="newForwardInsideIncome4" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:newForwardOutIpUse:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="new_system_h5_consume_ip"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="newForwardOutIpUse4" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
        <#if shiro.hasPermission("chartDetails2:newForwardInsideIpUse:exportExcel")>
        <div class="exportExcelBox">
            <span class="exportExcelBtn" data-exporType="new_system_h5_consume_ip"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </div>
    </#if>
    <div id="newForwardInsideIpUse4" class="chartStyle"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12 chartCon">
     <div class="exportExcelBox">
         <div class="row">
             <div class="col-md-2">
                 <#if shiro.hasPermission("chartDetails2:articleReadCount:exportExcel")>
                 <span class="exportExcelBtn" data-exporType=""><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
             </#if>
            </div>
             <div class="col-md-2" style="padding-right: 0px">
                 <select id="fromSelect"  class="selectpicker"   multiple  title="选择来源" onchange="selectChange()">
                     <option value="singlemessage">私聊</option>
                     <option value="groupmessage">群聊</option>
                     <option value="timeline">朋友圈</option>
                 </select>
             </div>
         <div class="col-md-2" style="padding-right: 0px">
             <select id="fromSelect2"  class="selectpicker"   multiple  title="选择事件类型" onchange="selectChange()">
             <option value="0">阅读文章</option>
             <option value="2">点击相关阅读</option>
             <option value="5">点击展开全文</option>
             <option value="6">阅读文档滚动到底部</option>
             </select>
         </div>
        </div>
    </div>
   <div id="articleReadCount4" class="chartStyle"></div>
</div>
</div>
<script type="text/javascript">
    function selectChange(){
        chartPage.getArticleReadCountData(currentId,currentStartDate,currentEndDate);
    }
    $(function () {
        //chartPage.init();
        chartPage.showChart();
        chartPage.showToptip();
    });
    var allData;
    var ipTotal;
    var isLoading = false;
    var currentId;
    var currentStartDate;
    var currentEndDate;
    var chartPage = {
        init:function (id,startDate,endDate) {
            var _this = this;
            $('#fromSelect').val(['singlemessage','groupmessage','timeline']);
            $('#fromSelect').selectpicker('refresh');
            $('#fromSelect2').val(['0']);
            $('#fromSelect2').selectpicker('refresh');
            currentId = id;
            currentStartDate = startDate;
            currentEndDate = endDate;
            _this.setTimer(id,startDate,endDate);
        },
        exportExcel:function (id,startDate,endDate) {
            var params = {
                platformId:id?id:'',
                beginDate:startDate?startDate:'',
                endDate:endDate?endDate:''
               // exportType:$(this).attr("data-exporType")
            };
            $(".exportExcelBtn").click(function () {
                params.exportType = $(this).attr("data-exporType");
               // console.log(params);
                var exportExUrl =  'platformStatisExport/downloadHistory';
                window.location.href = baseURL + exportExUrl + '?platformId='+params.platformId +'&beginDate=' +
                        params.beginDate + '&endDate=' + params.endDate + '&exportType=' + params.exportType;
            });
        },
        showToptip:function () {
            $('[data-toggle="tooltip"]').tooltip();
        },
        showChart:function () {
            this.setTimer();
            isAuth("chartDetials2:activeUsers:activeUsersCharts")?this.chartOpt('activeUsers','活跃用户'):hideDom2("#activeUsers");
            isAuth("chartDetials2:newUsers:newUsersCharts")?this.chartOpt('shareUsers','新增用户'):hideDom2("#shareUsers");
            isAuth("chartDetials2:ip:ipCharts")?this.chartOpt('ipTotal','IP数'):hideDom2("#ipTotal");
            isAuth("chartDetials2:addArticles:addArticlesCharts")?this.chartOpt('articleTotal','新增文章'):hideDom2("#articleTotal");
            isAuth("chartDetials2:badIp:badIpCharts")?this.chartOpt('badIp','被封域名'):hideDom2("#badIp");
            isAuth("chartDetials2:shareArticles:shareArticlesCharts")?this.chartOpt('shareArticle','转发文章数'):hideDom2("#shareArticle");
           // isAuth("chartDetials2:sharePeoples:sharePeoplesCharts")?this.chartOpt('sharePeoples','转发文章人数'):'';
           //dailyStatics:incomeChart:exportExcel dailyStatics:useChart:exportExcel
            isAuth("chartDetials2:income:incomeChart")?this.chartOpt('income','收益'):hideDom2("#income");
            isAuth("chartDetials2:ipUse:ipUseChart")?this.chartOpt('ipUse','ip消耗'):hideDom2("#ipUse");
            isAuth("chartDetials2:sharedArticleNum:sharedArticleNumChart")?this.chartOpt('sharedArticleNum','转发文章次数'):hideDom2("#sharedArticleNum");
            //chartDetails2:forwardIncome:showCharts
            isAuth("chartDetails2:forwardIncome:showCharts")?this.chartOpt('forwardIncome','转发区收益'):hideDom2("#forwardIncome");
            //chartDetails2:h5Income:showCharts
            isAuth("chartDetails2:h5Income:showCharts")?this.chartOpt('h5Income','h5收益'):hideDom2("#h5Income");
            //chartDetails2:forwardIpUse:showCharts
            isAuth("chartDetails2:forwardIpUse:showCharts")?this.chartOpt('forwardIpUse','转发区IP消耗'):hideDom2("#forwardIpUse");
            //chartDetails2:h5IpUse:showCharts
           // console.log(isAuth("chartDetails2:h5IpUse:showCharts"));
            isAuth("chartDetails2:h5IpUse:showCharts")?this.chartOpt('h5IpUse','h5IP消耗'):hideDom2("#h5IpUse");
            //chartDetails2:newTotalIncome:showCharts
            isAuth("chartDetails2:newTotalIncome:showCharts")?this.chartOpt('newIncome4','新广告系统收益'):hideDom2("#newIncome4");
            //chartDetails2:newForwardIncome:showCharts
            isAuth("chartDetails2:newForwardIncome:showCharts")?this.chartOpt('newForwardIncome4','新广告系统转发区收益'):hideDom2("#newForwardIncome4");
            //chartDetails2:newH5Income:showCharts
            isAuth("chartDetails2:newH5Income:showCharts")?this.chartOpt('newH5Income4','新广告系统h5收益'):hideDom2("#newH5Income4");
            //chartDetails2:newIpUse:showCharts
            isAuth("chartDetails2:newIpUse:showCharts")?this.chartOpt('newIpUse4','新广告系统ip消耗'):hideDom2("#newIpUse4");
            //chartDetails2:newForwardIpUse:showCharts
            isAuth("chartDetails2:newForwardIpUse:showCharts")?this.chartOpt('newForwardIpUse4','新广告系统转发区ip消耗'):hideDom2("#newForwardIpUse4");
            //chartDetails2:newH5IpUse:showCharts
            isAuth("chartDetails2:newH5IpUse:showCharts")?this.chartOpt('newH5IpUse4','新广告系统h5ip消耗'):hideDom2("#newH5IpUse4");
            //chartDetails2:transMoney:showCharts
            isAuth("chartDetails2:transMoney:showCharts")?this.chartOpt('transMoney','提现金额'):hideDom2("#transMoney");
            //chartDetails2:everyIpIncome:showCharts
            isAuth("chartDetails2:everyIpIncome:showCharts")?this.chartOpt('everyIpIncome','单ip产值(总)'):hideDom2("#everyIpIncome");
            //chartDetails2:everyIpUse:showCharts
            isAuth("chartDetails2:everyIpUse:showCharts")?this.chartOpt('everyIpUse','单ip支出'):hideDom2("#everyIpUse");
            //chartDetails2:dailyActiveIncome:showCharts
            isAuth("chartDetails2:dailyActiveIncome:showCharts")?this.chartOpt('dailyActiveIncome','日活产值(总)'):hideDom2("#dailyActiveIncome");
            //chartDetails2:dailyActiveUse:showCharts
            isAuth("chartDetails2:dailyActiveUse:showCharts")?this.chartOpt('dailyActiveUse','日活支出'):hideDom2("#dailyActiveUse");
            //chartDetails2:cashRate:showCharts
            isAuth("chartDetails2:cashRate:showCharts")?this.chartOpt('cashRate','提现占比(总)'):hideDom2("#cashRate");
            //chartDetails2:newUseActiveRate:showCharts
            isAuth("chartDetails2:newUseActiveRate:showCharts")?this.chartOpt('newUserActiveRate','新用户活跃率'):hideDom2("#newUserActiveRate");
            //chartDetails2:newForwardOutIncome:showCharts
            isAuth("chartDetails2:newForwardOutIncome:showCharts")?this.chartOpt('newForwardOutIncome4','新转发区外部收益'):hideDom2("#newForwardOutIncome4");
            //chartDetails2:newForwardInsideIncome:showCharts
            isAuth("chartDetails2:newForwardInsideIncome:showCharts")?this.chartOpt('newForwardInsideIncome4','新转发区内部收益'):hideDom2("#newForwardInsideIncome4");
            //chartDetails2:newForwardOutIpUse:showCharts
            isAuth("chartDetails2:newForwardOutIpUse:showCharts")?this.chartOpt('newForwardOutIpUse4','新转发区外部ip消耗'):hideDom2("#newForwardOutIpUse4");
            //chartDetails2:newForwardInsideIpUse:showCharts
            isAuth("chartDetails2:newForwardInsideIpUse:showCharts")?this.chartOpt('newForwardInsideIpUse4','新转发区内部ip消耗'):hideDom2("#newForwardInsideIpUse4");
           //chartDetails2:articleReadCount:showCharts
            isAuth("chartDetails2:articleReadCount:showCharts")?this.chartOpt('articleReadCount4','阅读来源统计'):hideDom2("#articleReadCount4");
         },
        goToDetails:function () {
            $("#goDetails").click(function () {
                window.location.href = "modules/view/mainDetails.html";
            });
        },
        setHours:function () {
            var hours = [];
            for (let i=0;i<24;i++){
               if(i<10){
                   hours.push(0 + '' + i + ':00');
                }else{
                  hours.push(i + ':00');
               }

             };
            //console.log(hours);
            return hours;
        },
        setTimer:function (id,startDate,endDate) {
            var _this = this;
            _this.getIp(id,startDate,endDate);
            _this.getBadIp(id,startDate,endDate);
            _this.addDailyArticle(id,startDate,endDate);
            _this.shareDailyArticle(id,startDate,endDate);
            _this.addDailyUser(id,startDate,endDate);
            _this.activeDailyUser(id,startDate,endDate);
           // _this.dailySharePeoples(id,startDate,endDate);
            _this.getIncomeData(id,startDate,endDate);
            _this.getIpUse(id,startDate,endDate);
            _this.getSharedArticleNum(id,startDate,endDate);
            _this.exportExcel(id,startDate,endDate);

            _this.getH5IpUse(id,startDate,endDate);
            _this.getForwardIpUse(id,startDate,endDate);
            _this.getForwardIncome(id,startDate,endDate);
            _this.getH5Income(id,startDate,endDate);
            _this.getNewTotalIncome4(id,startDate,endDate);
            _this.getNewForwardIncome4(id,startDate,endDate);
            _this.getNewH5Income4(id,startDate,endDate);
            _this.getNewIpUse4(id,startDate,endDate);
            _this.getNewForwardIpUse4(id,startDate,endDate);
            _this.getNewH5IpUse4(id,startDate,endDate);
            _this.getTransMoney(id,startDate,endDate);
            _this.getEveryIpIncome(id,startDate,endDate);
            _this.getEveryIpUse(id,startDate,endDate);
            _this.getDailyActiveIncome(id,startDate,endDate);
            _this.getDailyActiveUse(id,startDate,endDate);
            _this.getCashRate(id,startDate,endDate);
            _this.getNewUseActiveRate(id,startDate,endDate);
            _this.getNewForwardOutIncome5(id,startDate,endDate);
            _this.getNewForwardInsideIncome5(id,startDate,endDate);
            _this.getNewForwardOutIpUse5(id,startDate,endDate);
            _this.getNewForwardInsideIpUse5(id,startDate,endDate);
            _this.getArticleReadCountData(id,startDate,endDate);
        },
        getArticleReadCountData:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                beginDate:startDate,
                endDate:endDate,
                platformId:id,
                params:$("#fromSelect").val(),
                params2:$("#fromSelect2").val()
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:articleReadCount:showCharts",
                url: baseURL+"articleStatis/getArticleRecordReadNumStaticsLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showArticleReadCountChart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForwardInsideIpUse5:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:newForwardInsideIpUse:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemStatisticsForwardAreaInIpLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewForwardInsideIpUse5(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForwardOutIpUse5:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:newForwardOutIpUse:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemStatisticsForwardAreaOutIpLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewForwardOutIpUse5(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForwardInsideIncome5:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:newForwardInsideIncome:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemStatisticsForwardAreaInPriceLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewForwardInsideIncome5(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForwardOutIncome5:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:newForwardOutIncome:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemStatisticsForwardAreaOutPriceLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewForwardOutIncome5(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewUseActiveRate:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:newUseActiveRate:showCharts",
                url: baseURL+"platformStatis/getPlatformStaticsLineChartByActiveRatio",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewUseActiveRate(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getCashRate:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:cashRate:showCharts",
                url: baseURL+"platformStatis/getPlatformStaticsLineChartByGiftRecordRate",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showCashRate(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getDailyActiveUse:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:dailyActiveUse:showCharts",
                url: baseURL+"platformStatis/getPlatformStaticsLineChartByDayActivePay",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showDailyActiveUse(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getDailyActiveIncome:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:dailyActiveIncome:showCharts",
                url: baseURL+"platformStatis/getPlatformStaticsLineChartByDayActiveExpand",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showDailyActiveIncome(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getEveryIpUse:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:everyIpUse:showCharts",
                url: baseURL+"platformStatis/getPlatformStaticsLineChartBySingleIpPay",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showEveryIpUse(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getEveryIpIncome:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:everyIpIncome:showCharts",
                url: baseURL+"platformStatis/getIpProducePlatformStaticsLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showEveryIpIncome(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getTransMoney:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:transMoney:showCharts",
                url: baseURL+"platformStatis/getPlatformStaticsLineChartByCreateMoney",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showTransMoneyCharts(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewH5IpUse4:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:newH5IpUse:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemStatisticsH5IpLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewH5IpUse4Chart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForwardIpUse4:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:newForwardIpUse:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemStatisticsForwardAreaIpLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewForwardIpUse4Chart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewIpUse4:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:newIpUse:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemStatisticsIpLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewIpUse4Chart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewH5Income4:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:newH5Income:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemStatisticsH5PriceLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showH5Income4Chart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForwardIncome4:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:newForwardIncome:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemStatisticsForwardAreaPriceLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showForwardIncome4Chart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewTotalIncome4:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:newTotalIncome:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemStatisticsPriceLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showTotalIncome4Chart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getH5IpUse:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:h5IpUse:showCharts",
                url: baseURL+"articleStatisNew/getStatisticsH5IpStatisLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showH5IpUseChart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getForwardIpUse:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:forwardIpUse:showCharts",
                url: baseURL+"articleStatisNew/getStatisticsForwardAreaIpStatisLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showForwardIpUseChart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getForwardIncome:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:forwardIncome:showCharts",
                url: baseURL+"articleStatisNew/getForwardAreaExpandPriceStatisLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showForwardIncomeCharts(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getH5Income:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetails2:h5Income:showCharts",
                url: baseURL+"articleStatisNew/getH5ExpandPriceStatisLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showH5IncomeCharts(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getSharedArticleNum:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                startDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetials2:sharedArticleNum:sharedArticleNumChart",
                url: baseURL+"articleStatis/getSharedArticleNumEveryDayChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.sharedArticleNumChart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getIp:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                platformId:id,
                startDate:startDate,
                endDate:endDate
            };
            ajaxc({
                    type: "POST",
                    permit:"chartDetials2:ip:ipCharts",
                    url: baseURL+"ip/getIpDailyStaChart",
                    data: JSON.stringify(data),
                    contentType : "application/json",
                    success: function(result){
                        if(result.code == 0){//登录成功
                            //console.log(result.result)
                             _this.ipTotal( result.result);
                            }else{
                            layer.msg(result.msg);
                        }
                    }
                });
         },
        getIncomeData:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                beginDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetials2:income:incomeChart",
                url: baseURL+"articleStatis/getExpandPriceStatisLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.incomeChart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getIpUse:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                beginDate:startDate,
                endDate:endDate,
                platformId:id
            };
            ajaxc({
                type: "POST",
                permit:"chartDetials2:ipUse:ipUseChart",
                url: baseURL+"articleStatis/getStatisticsIpStatisLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.ipUseChart(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getBadIp:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                platformId:id,
                startDate:startDate,
                endDate:endDate
            };
            ajaxc({
                type: "POST",
                permit:"chartDetials2:badIp:badIpCharts",
                url: baseURL+"domainsta/findLockedDomainStaSearchChart",
                data: JSON.stringify(data),
                contentType : "application/json",
                success: function(result){
                   if(result.code == 0){//登录成功
                        //console.log(result.result)
                       _this.badIp( result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        shareDailyArticle:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                platformId:id,
                startDate:startDate,
                endDate:endDate
            };
            ajaxc({
                type: "POST",
                permit:"chartDetials2:shareArticles:shareArticlesCharts",
                url: baseURL+"statis/getForwarArticleEveryDay",
                data: JSON.stringify(data),
                contentType : "application/json",
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.shareArticle( result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
       addDailyArticle:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                platformId:id,
                startDate:startDate,
                endDate:endDate
            };
           ajaxc({
                type: "POST",
                permit:"chartDetials2:addArticles:addArticlesCharts",
                url: baseURL+"statis/getNewArticleEveryDay",
                data: JSON.stringify(data),
                contentType : "application/json",
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.articleTotal( result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        addDailyUser:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                platformId:id,
                startDate:startDate,
                endDate:endDate
            };
            ajaxc({
                type: "POST",
                permit:"chartDetials2:newUsers:newUsersCharts",
                url: baseURL+"/statis/getNewUserBrokenLine",
                data: JSON.stringify(data),
                contentType : "application/json",
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.shareUsers( result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        activeDailyUser:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                platformId:id,
                startDate:startDate,
                endDate:endDate
            };
            ajaxc({
                type: "POST",
                permit:"chartDetials2:activeUsers:activeUsersCharts",
                url: baseURL+"statis/getActiveUserBrokenLine",
                data: JSON.stringify(data),
                contentType : "application/json",
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.activeUsers( result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        dailySharePeoples:function (id,startDate,endDate) {
            var _this = this;
            var data = {
                platformId:id,
                startDate:startDate,
                endDate:endDate
            };
            ajaxc({
                type: "POST",
                permit:"chartDetials2:sharePeoples:sharePeoplesCharts",
                url: baseURL+"articleStatis/getForwarArticlePeopleEveryDayChart",
                data: JSON.stringify(data),
                contentType : "application/json",
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.sharePeoples(result.result);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
       chartOpt:function (id,title) {
             var _this = this;
             // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById(id));
            // console.log(myChart)
            // 指定图表的配置项和数据
            var option = {
                title: {
                    text: title
                },
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'cross',
                        label: {
                            backgroundColor: '#6a7985'
                        }
                    }
                },
                color:['#2ec770','#1c97f5'],
                legend: {
                    data:['昨日','今日'],
                    left: '50%',
                },
                grid: {
                    left: '40px',
                    right: '4%',
                    top:'80px',
                    bottom:'3%',
                    containLabel: true
                },
                toolbox: {
                    feature: {
                        saveAsImage: {}
                    }
                },
                xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    name:'时间',
                    nameLocation:'start',
                    data:_this.setHours()
                },
                yAxis: {
                    type: 'value',
                    name:'数量'
                },
                series: [
                    {
                        name:'昨日',
                        type:'line',
                        lineStyle:{
                            color:'#2ec770'
                        },
                        smooth: true,
                        data:[]
                    },
                    {
                        name:'今日',
                        type:'line',
                        areaStyle: {},
                        lineStyle:{
                            color:'#1c97f5'
                        },
                        smooth: true,
                        data:[]
                    }
                ]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option,true);

        },
        commonOption:function (id,title,yData,xData) {
            var _this = this;
            var setOpt  = {};
            var axLabel = {
                formatter:'{value}'
            };
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById(id));
            // console.log(myChart)
            // 指定图表的配置项和数据
            var option = {
                title: {
                    text: title
                },
                tooltip: {
                    trigger: 'axis',
                    // formatter:function (params) {
                    //     //console.log(params,'22222');
                    //     var data;
                    //     var html = '';
                    //     var perHtml = '';
                    //     if(params.length > 1){
                    //         data = calPercent(params[1].value,params[0].value);
                    //         if(data.perType == 1){
                    //             perHtml = '<i class="fa fa-long-arrow-up" style="color: red;margin-right: 3px"></i><span style="color: red;">'+data.percent+'</span>';
                    //         }else if(data.perType == 2){
                    //             perHtml = '<i class="fa fa-long-arrow-down" style="color: #2ec770;margin-right: 3px"></i><span style="color: #2ec770;">'+data.percent+'</span>';
                    //         }
                    //
                    //     }
                    //     params.map(function (item) {
                    //         if(item.seriesName == '今日'){
                    //             html = html + '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + item.color + '"></span>' + item.seriesName + ':' + item.value + '&nbsp;&nbsp;&nbsp;'+ perHtml;
                    //         }else{
                    //             html = html + '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + item.color + '"></span>' + item.seriesName + ':' + item.value + '<br/>';
                    //         }
                    //     });
                    //     return html;
                    // },
                    axisPointer: {
                        type: 'cross',
                        label: {
                            backgroundColor: '#6a7985',
                            formatter:function (params) {
                                return params.value.toFixed(0)
                            }
                        }
                    }
                },
                color:['#2ec770','#1c97f5'],
                legend: {
                    left: '50%',
                },
                grid: {
                    left: '40px',
                    right: '4%',
                    top:'80px',
                    bottom:'3%',
                    containLabel: true
                },
                toolbox: {
                    feature: {
                        saveAsImage: {}
                    }
                },
                xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    name:'时间',
                    nameLocation:'start',
                    data:xData,
                    axisPointer:{
                        label:axLabel
                    },
                    axisLabel:setOpt
                    // splitArea:{
                    //     interval:59
                    // },
                    // splitLine:{
                    //     interval:59
                    // }
                },
                yAxis: {
                    type: 'value',
                    name:'数量'
                }
                // ,
                // dataZoom: title=='IP数'?[]:[{
                //     startValue: '00:00'
                // }, {
                //     type: 'inside'
                // }
                // ]
                ,
                series: [
                    {
                        type:'line',
                        lineStyle:{
                            color:'#2ec770'
                        },
                        smooth: true,
                        data:yData
                    }
                ]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option,true);

        },
        commonOption2:function (id,title,yYData,xAxis,typeName) {
            var _this = this;
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById(id));
            // console.log(myChart)
            // 指定图表的配置项和数据
            var option = {
                title: {
                    text: title
                },
                tooltip: {
                    trigger: 'axis',
                    formatter:typeName == 'rate'?'{c}%':'',
                    axisPointer: {
                        type: 'cross',
                        label: {
                            backgroundColor: '#6a7985',
                            formatter:function (params) {
                                // console.log(params)
                                return params.value.toFixed(0)
                            }
                        }
                    }
                },
                color:['#2ec770','#1c97f5'],
                legend: {
                    data:['数量'],
                    left: '50%',
                },
                grid: {
                    left: '40px',
                    right: '4%',
                    top:'80px',
                    bottom:'3%',
                    containLabel: true
                },
                toolbox: {
                    feature: {
                        saveAsImage: {}
                    }
                },
                xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    name:'时间',
                    nameLocation:'start',
                    data:xAxis,
                    axisLabel: {
                        showMaxLabel: true
                    },
                    axisPointer:{
                        label:{
                            formatter:'{value}'
                        }
                    }
                },
                yAxis: {
                    type: 'value',
                    name:'数量',
                    axisLabel:typeName=='rate'? {
                        show: true,
                        interval: 'auto',
                        formatter: '{value}%'
                    }:{}
                },
                dataZoom: [],
                series: [{
                    name:'数量',
                    type:'line',
                    lineStyle:{
                        color:'#2ec770'
                    },
                    smooth: true,
                    data:yYData
                }]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option,true);

        },
        activeUsers:function (data) {
            this.commonOption('activeUsers','活跃用户',data.dataCount ,data.xaxis);
            // $("#activeUsers").siblings(".chartText").find(".tCurrentTotal").text(transData(allData.totalData[4].tTActiveUser));
            // $("#activeUsers").siblings(".chartText").find(".yCurrentTotal").text(transData(allData.totalData[4].yActiveUser));
            // $("#activeUsers").siblings(".chartText").find(".yTotal").text(transData(allData.totalData[4].yTActiveUser));
        },
        shareUsers:function (data) {
            this.commonOption('shareUsers','新增用户',data.dataCount ,data.xaxis);
            // $("#shareUsers").siblings(".chartText").find(".tCurrentTotal").text(transData(allData.totalData[3].tTNewUser));
            // $("#shareUsers").siblings(".chartText").find(".yCurrentTotal").text(transData(allData.totalData[3].yNewUser));
            // $("#shareUsers").siblings(".chartText").find(".yTotal").text(transData(allData.totalData[3].yTNewUser));
        },
        ipTotal:function (data) {
            this.commonOption('ipTotal','IP数',data.dataCount ,data.xaxis);
            //console.log( $("#ipTotal").siblings(".chartText .tCurrentTotal").html())
            // $("#ipTotal").siblings(".chartText").find(".tCurrentTotal").text(transData(ipTotal.todayNowCount));
            // $("#ipTotal").siblings(".chartText").find(".yCurrentTotal").text(transData(ipTotal.yesterdayNowCount));
            // $("#ipTotal").siblings(".chartText").find(".yTotal").text(transData(ipTotal.yesterdayTotalCount));
        },
        articleTotal:function (data) {
            this.commonOption('articleTotal','新增文章',data.dataCount ,data.xaxis);
            // $("#articleTotal").siblings(".chartText").find(".tCurrentTotal").text(transData(allData.totalData[0].tTNewArticle));
            // $("#articleTotal").siblings(".chartText").find(".yCurrentTotal").text(transData(allData.totalData[0].yNewArticle));
            // $("#articleTotal").siblings(".chartText").find(".yTotal").text(transData(allData.totalData[0].yTNewArticle));
        },
        badIp:function (data) {
            this.commonOption('badIp','被封域名',data.dataCount ,data.xaxis);
            // $("#badIp").siblings(".chartText").find(".tCurrentTotal").text(transData(allData.totalData[2].tTTLockedDomain));
            // $("#badIp").siblings(".chartText").find(".yCurrentTotal").text(transData(allData.totalData[2].yLockedDomain));
            // $("#badIp").siblings(".chartText").find(".yTotal").text(transData(allData.totalData[2].yTLockedDomain));
        },
        shareArticle:function (data) {
            this.commonOption('shareArticle','转发文章数',data.dataCount ,data.xaxis);
            // $("#shareArticle").siblings(".chartText").find(".tCurrentTotal").text(transData(allData.totalData[1].tTForwardArticle));
            // $("#shareArticle").siblings(".chartText").find(".yCurrentTotal").text(transData(allData.totalData[1].yForwardArticle));
            // $("#shareArticle").siblings(".chartText").find(".yTotal").text(transData(allData.totalData[1].yTForwardArticle));
        },
        sharePeoples:function (data) {
            //console.log(data);
            this.commonOption('sharePeoples','转发文章人数',data.dataCount ,data.xaxis);
            // $("#shareArticle").siblings(".chartText").find(".tCurrentTotal").text(transData(allData.totalData[1].tTForwardArticle));
            // $("#shareArticle").siblings(".chartText").find(".yCurrentTotal").text(transData(allData.totalData[1].yForwardArticle));
            // $("#shareArticle").siblings(".chartText").find(".yTotal").text(transData(allData.totalData[1].yTForwardArticle));
        },
        incomeChart:function (data) {
            this.commonOption2('income','收益',data.countList[0].counts,data.xaxis);
        },
        ipUseChart:function (data) {
            this.commonOption2('ipUse','ip消耗',data.countList[0].counts,data.xaxis);
        },
        sharedArticleNumChart:function (data) {
            this.commonOption2('sharedArticleNum','转发文章次数',data.dataCount,data.xaxis);
        },
        showForwardIncomeCharts:function (data) {
            this.commonOption2('forwardIncome','转发区收益',data.countList[0].counts,data.xaxis);
        },
        showH5IncomeCharts:function (data) {
            this.commonOption2('h5Income','h5收益',data.countList[0].counts,data.xaxis);
        },
        showForwardIpUseChart:function (data) {
            this.commonOption2('forwardIpUse','转发区IP消耗',data.countList[0].counts,data.xaxis);
        },
        showH5IpUseChart:function (data) {
            this.commonOption2('h5IpUse','h5IP消耗',data.countList[0].counts,data.xaxis);
        },
        showTotalIncome4Chart:function (data) {
            this.commonOption2('newIncome4','新广告系统收益',data.countList[0].counts,data.xaxis);
        },
        showForwardIncome4Chart:function (data) {
            this.commonOption2('newForwardIncome4','新广告系统转发区收益',data.countList[0].counts,data.xaxis);
        },
        showH5Income4Chart:function (data) {
            this.commonOption2('newH5Income4','新广告系统H5收益',data.countList[0].counts,data.xaxis);
        },
        showNewIpUse4Chart:function (data) {
            this.commonOption2('newIpUse4','新广告系统ip消耗',data.countList[0].counts,data.xaxis);
        },
        showNewForwardIpUse4Chart:function (data) {
            this.commonOption2('newForwardIpUse4','新广告系统转发区ip消耗',data.countList[0].counts,data.xaxis);
        },
        showNewH5IpUse4Chart:function (data) {
            this.commonOption2('newH5IpUse4','新广告系统h5ip消耗',data.countList[0].counts,data.xaxis);
        },
        showTransMoneyCharts:function (data) {
            this.commonOption2('transMoney','提现金额',data.countList[0].counts,data.xaxis);
        },
        showEveryIpIncome:function (data) {
            this.commonOption2('everyIpIncome','单ip产值(总)',data.countList[0].counts,data.xaxis);
        },
        showEveryIpUse:function (data) {
            this.commonOption2('everyIpUse','单ip支出',data.countList[0].counts,data.xaxis);
        },
        showDailyActiveIncome:function (data) {
            this.commonOption2('dailyActiveIncome','日活产值(总)',data.countList[0].counts,data.xaxis);
        },
        showDailyActiveUse:function (data) {
            this.commonOption2('dailyActiveUse','日活支出',data.countList[0].counts,data.xaxis);
        },
        showCashRate:function (data) {
            this.commonOption2('cashRate','提现占比(总)',data.countList[0].counts,data.xaxis,'rate');
        },
        showNewUseActiveRate:function (data) {
            this.commonOption2('newUserActiveRate','新用户活跃率',data.countList[0].counts,data.xaxis,'rate');
        },
        showNewForwardOutIncome5:function (data) {
            this.commonOption2('newForwardOutIncome4','新转发区外部收益',data.countList[0].counts,data.xaxis);
        },
        showNewForwardInsideIncome5:function (data) {
            this.commonOption2('newForwardInsideIncome4','新转发区内部收益',data.countList[0].counts,data.xaxis);
        },
        showNewForwardOutIpUse5:function (data) {
            this.commonOption2('newForwardOutIpUse4','新转发区外部ip消耗',data.countList[0].counts,data.xaxis);
        },
        showNewForwardInsideIpUse5:function (data) {
            this.commonOption2('newForwardInsideIpUse4','新转发区内部ip消耗',data.countList[0].counts,data.xaxis);
        },
        showArticleReadCountChart:function (data) {
            this.commonOption2('articleReadCount4','阅读来源统计',data.countList[0].counts,data.xaxis);
        }
    };
</script>
<style>
    .exportExcelBtn{
        padding: 6px 10px;
        background-color: #0C0C0C;
        color: #fff;
        font-size: 14px;
        border-radius: 2px;
    }
    .exportExcelBtn:hover{
        cursor: pointer;
    }
    .exportExcelBox{
        margin-bottom: 20px;
    }
</style>